package com.sys.service;

import java.sql.SQLException;

import com.sys.domain.File;

public interface UploadOperationSer {
	/**
	 * @Title: getFileName 
	 * @Description: TODO(得到上传文件的真实名称) 
	 * @param header
	 * @return String
	 */
	public String getFileName(String header);
	
	/**
	 * @Title: addUpload
	 * @Description: TODO(向upload表中插入上传记录) 
	 * @param userId upTime fileId
	 * @return Boolean
	 * @throws SQLException
	 */
	public Boolean addUpload(String userId, String upTime, Long size, String fileId) throws SQLException;
	
	/**
	 * @Title: getUUID 
	 * @Description: TODO(获得唯一标识) 
	 * @return String
	 */
	public String getUUID();
	
	/**
	 * @Title: getCurrentDate 
	 * @Description: TODO(获得当前时间) 
	 * @return String
	 */
	public String getCurrentDate();
	
	/**
	 * @Title: deleteUserIdOfFile 
	 * @Description: TODO(获得删除上传学号后的文件名并返回) 
	 * @param str
	 * @return String
	 */
	public String deleteUserIdOfFile(String str);
	
	/**
	 * @Title: isFileNameHasExisted 
	 * @Description: TODO(确定文件是不是已存在) 
	 * @param @param fileName
	 * @return Boolean
	 * @throws SQLException
	 */
	public Boolean isFileNameHasExisted(String fileName) throws SQLException;
	
	/**
	 * @Title: getFileSize 
	 * @Description: TODO(得到文件大小) 
	 * @param path
	 * @return Long
	 */
	public Long getFileSize(String path);
	
	public File setFileApproved(String fileId, String fileType) throws SQLException;
}